package com.itbuka.feign;


import com.buka.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;


@FeignClient(name = "minio", url = "http://localhost:9009")
public interface MinioFeign {

    //    @PostMapping("minio/upload")
    @RequestMapping(method = RequestMethod.POST, value = "minio/uploadF", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    Result<String> uploadF(@RequestPart("file") MultipartFile file);

    @PostMapping("minio/test")
    int test(@RequestBody Integer id);

//    @RequestMapping(method = RequestMethod.POST, value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
//    String uploadFile(@RequestPart("file") MultipartFile file);


}